<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>button | anni-ui</title>
    <link rel="stylesheet" href="../vars.css">
    <link rel="stylesheet" href="../demo.css">
    <link rel="stylesheet" href="../icon/icon.css">
    <link rel="stylesheet" href="./button.css">

    <style>
        .an-btn[data-type="#11ff04"] {
            --an-btn-text-color: #fff;
            --an-btn-bg-color: #11ff04;
            --an-btn-border-color: #11ff04;
        }
    </style>
</head>

<body>
    <button class="an-btn">
        <span class="an-icon">
            <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
                <path
                    d="M13.0001 16.1716L18.3641 10.8076L19.7783 12.2218L12.0001 20L4.22192 12.2218L5.63614 10.8076L11.0001 16.1716V4H13.0001V16.1716Z">
                </path>
            </svg>
        </span>
        <span>默认</span>
    </button>
    <button class="an-btn" data-type="primary">主要</button>
    <button class="an-btn" data-type="success">成功</button>
    <button class="an-btn" data-type="warning">警告</button>
    <button class="an-btn" data-type="danger">危险</button>
    <button class="an-btn" data-type="#11ff04">自定义</button>
    <button class="an-btn" data-type="primary" data-round>Round</button>
    <button class="an-btn" id="disabledBtn" data-disabled>Disabled</button>
    <button class="an-btn" data-type="danger" style="--an-btn-height:24px;--an-btn-padding:10px">危险</button>
    <button class="an-btn" data-type="danger" style="--an-btn-height:50px;--an-btn-padding:50px">危险</button>

    <br>
    <br>

    <button class="an-btn" id="blockBtn" data-block>Block</button>

    <br>
    <br>

    <script>
        disabledBtn.addEventListener('click', function () {
            console.log(this)
        })
        blockBtn.addEventListener('click', function () {
            console.log(this)
        })
    </script>
</body>

</html>